/**
 * Created with IntelliJ IEDA.
 * Description:
 * User:86186
 * Date:2022-10-31
 * Time:22:23
 */

/**
 * 爬楼梯
 */

public class climbStairs { public static void main(String[] args) {
        byte b1 = 1,b2 = 2,b3,b6;
        final  byte b4 = 4,b5 = 6;
    }
    public int climbStairs(int n) {
        //动态规划
        int pre = 0;
        int fea = 0;
        int sta = 1;
        for(int i = 0;i < n;i++){
            pre = fea;
            fea = sta;
            sta = pre + fea;
        }
        return sta;
    }
}
